package demo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 张宇田
 * Date: 2024-10-23
 * Time: 21:22
 */
public class Test2 {

}
class m {
    public int fs (String s){
        String[] ss = s.split(" ");
        return ss[ss.length - 1].length();
    }
    public int fs2 (String s){
        int x = s.lastIndexOf(" ");
        String XY= s.substring(x+1);//空格后羿位置 截取
        return XY.length();
        System.out.println();
    }
}
